<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
 * Class Comment
 * @package App
 */
class Comment extends Model
{
	/**
	 * @var string
	 */
	protected $table = 'comments';
	/**
	 * @var array
	 */
	protected $fillable = ['user_id', 'body', 'commentable_id', 'commentable_type'];
	/**
	 * @return \Illuminate\Database\Eloquent\Relations\MorphTo
	 */
	public function commentable()
	{
		return $this->morphTo();
	}
	/**
	 * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
	 */
	public function user()
	{
		return $this->belongsTo(User::class);
	}
}